package adapter;


public class MediaPlayerAdapter implements AdvancedMediaPlayer {
    private MediaPlayer mediaPlayer;

    public MediaPlayerAdapter(MediaPlayer mediaPlayer) {
        this.mediaPlayer = mediaPlayer;
    }

    @Override
    public void playWav(String fileName) {
        // 通过适配进行转换
        mediaPlayer.playMp3(fileName);
    }

    @Override
    public void playOgg(String fileName) {
        // 通过适配进行转换
        mediaPlayer.playMp3(fileName);
    }
}


